import request from '@/utils/request'

export function getCategoryPage(params) {
  return request({
    url: '/v1/category/page',
    method: 'get',
    params
  })
}

export function createCategory(data) {
  return request({
    url: '/v1/category/save',
    method: 'post',
    data
  })
}

export function updateCategory(data) {
  return request({
    url: '/v1/category/update',
    method: 'put',
    data
  })
}

export function deleteCategory(params) {
  return request({
    url: '/v1/category/remove',
    method: 'delete',
    params
  })
}

export function getCategoryDetail(params) {
  return request({
    url: '/v1/category/detail',
    method: 'get',
    params
  })
}

export function getSeasonsCategoryPage(params) {
  return request({
    url: '/v1/seasonsCategory/page',
    method: 'get',
    params
  })
}

export function seasonsCategoryDetail(params) {
  return request({
    url: '/v1/seasonsCategory/detail',
    method: 'get',
    params
  })
}

export function createSeasonsCategory(data) {
  return request({
    url: '/v1/seasonsCategory/save',
    method: 'post',
    data
  })
}

export function updateSeasonsCategory(data) {
  return request({
    url: '/v1/seasonsCategory/update',
    method: 'put',
    data
  })
}

export function deleteSeasonsCategory(params) {
  return request({
    url: '/v1/seasonsCategory/remove',
    method: 'delete',
    params
  })
}
